package com.linkage.usercenter.dao;

import com.linkage.usercenter.pojo.entity.CoreUser;
import com.linkage.usercenter.pojo.vo.UserInfoListVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface CoreUserMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(CoreUser record);

    int insertSelective(CoreUser record);

    CoreUser selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(CoreUser record);

    int updateByPrimaryKey(CoreUser record);

    int getCountByUserCode(String userCode);

    CoreUser getRecordByUserCode(@Param("userCode") String userCode, @Param("mobile")String mobile);

    List<CoreUser> getCheckUserInfo(@Param("userCode") String userCode, @Param("oldPassword") String oldPassword);

    void updatePassword(CoreUser userInfo);

    List<CoreUser> getLoginUserInfo(@Param("userCode")String userCode, @Param("mobile") String mobile, @Param("password")String password);

    CoreUser getRecordByPersonCode(String personCode);

    CoreUser getRecordByMobile(String userMobile);

    int getRecordNumByMobile(String userMobile);

    List<CoreUser> getAllRecordByUserCode(String userCode);

    List<CoreUser> getAllRecordByUserCodeAndName(String userCode);

    List<CoreUser> getAllRecordByUserName(String userCode);

    List<CoreUser> queryCoreUserByOrgCode(String orgCode);

    List<CoreUser> queryCoreUserByDptCode(String dptCode);

    List<CoreUser> queryCoreUserByRoleCode(String roleCode);

    List<CoreUser> queryUserByDptWithPersonClass(@Param("dptCode") String dptCode, @Param("personClass") String personClass);

    CoreUser getRecordByCardNo(String cardNo);

    List<UserInfoListVO> queryUserInfoListVOs(@Param("mobile")String reqUserMobile, @Param("personClass")String personClass);

    CoreUser selectByUserCode(@Param("userCode")String userCode);

    List<CoreUser> getAllRecordForAudit(@Param("personClass")String personClass);

    List<CoreUser> selectByDptCode(String dptCode);

    void deleteByDptCode(String dptCode);

    List<CoreUser> selectGLYOneByDptCode(String dptCode);
}